package com.whfc.ms.api.sys.service.impl;

import com.whfc.fuum.dto.SysRuleDTO;
import com.whfc.fuum.param.SysRuleFastAdd;
import com.whfc.fuum.service.SysUserRuleFastService;
import com.whfc.ms.api.sys.service.MsSysRuleFastService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MsSysRuleFastServiceImpl implements MsSysRuleFastService {

    @DubboReference(interfaceClass = SysUserRuleFastService.class, version = "1.0.0")
    private SysUserRuleFastService sysUserRuleFastService;

    @Override
    public List<SysRuleDTO> findByUserIdAndDeptId(Integer userId, Integer deptId) {
        return sysUserRuleFastService.findByUserIdAndDeptId(userId,deptId);
    }

    @Override
    public List<SysRuleDTO> findAllByUserIdAndDeptId(Integer userId,Integer deptId) {
        return sysUserRuleFastService.findAllByUserIdAndDeptId(userId,deptId);
    }

    @Override
    public void addUserRuleFast(SysRuleFastAdd sysRuleFastAdd) {
        sysUserRuleFastService.addUserRuleFast(sysRuleFastAdd);
    }
}
